import 'package:flutter/material.dart';

class TeamPlane extends StatefulWidget {
  final FocusNode focusNode1;
  final FocusNode focusNode2;
  TeamPlane({@required this.focusNode1, @required this.focusNode2});

  @override
  _TeamPlaneState createState() => _TeamPlaneState(focusNode1: focusNode1, focusNode2: focusNode2);
}

class _TeamPlaneState extends State<TeamPlane> {
  final FocusNode focusNode1;
  final FocusNode focusNode2;
  _TeamPlaneState({@required this.focusNode1, @required this.focusNode2});

  static const String DefaultTeam1 = "地表最强战队";
  static const String DefaultTeam2 = "天哪！怎么可以这么炸战队";


  String team1;
  String team2;

  @override
  Widget build(BuildContext context) {
    return Column(
      children: <Widget>[
        new Row(
          mainAxisAlignment: MainAxisAlignment.start,
          children: <Widget>[
            new Text("TEAM 1:", style: TextStyle(fontSize: 20.0, fontStyle: FontStyle.normal, color: Colors.black),),
            SizedBox(width: 5.0,),
            new Flexible(
              child: new TextField(
                keyboardType: TextInputType.text,
                focusNode: focusNode1,
                decoration: new InputDecoration(
                  //icon: Icons.people,
                  hintText: "Type Team 1 Name",
                  border: InputBorder.none
                ),
                onChanged: (String team) {
                  team2 = team;
                },
              ),
            ),
          ],
        ),

        new Row(
          children: <Widget>[
            new Text("TEMA 2:", style: TextStyle(fontStyle: FontStyle.normal, fontSize: 20.0, color: Colors.black),),
            SizedBox(width: 5.0,),
            new Flexible(
              child: new TextField(
                keyboardType: TextInputType.text,
                focusNode: focusNode2,
                decoration: new InputDecoration(
                  hintText: "Type Team 2 Name",
                  border: InputBorder.none
                ),
                onChanged: (String team) {
                  team2 = team;
                },
              ),
            )
          ],
        ),
      ],
    );
  }
}